package com.neu.credit.creditscore.entity.hospital;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Schema(name = "Appointments", description = "预约信息表")
public class Appointments {

    //预下单
    public static final int STATUS_PRE = 0;
    //待就诊
    public static final int STATUS_WAITING = 1;
    //已就诊
    public static final int STATUS_DONE = 2;
    //已取消
    public static final int STATUS_CANCEL = 3;
    //接诊中
    public static final int STATUS_USING = 4;
    //已完成
    public static final int STATUS_END = 5;
    //逾期未支付
    public static final int   STATUS_OVERDUE=6;
    @Schema(description = "预约ID，自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "医生ID")
    private Integer doctorId;

    @Schema(description = "科室ID")
    private Integer departmentId;

    @Schema(description = "预约时间")
    private Date appointmentTime;

    @Schema(description = "就诊原因")
    private String reason;

    @Schema(description = "联系人电话")
    private String contactPhone;

    @Schema(description = "预约状态（0-预下单，1-待就诊，2-已就诊，3-已过期, 4-接诊中）")
    private int appointmentStatus;

    @Schema(description = "创建时间")
    private Date createdAt;

    @Schema(description = "更新时间")
    private Date updatedAt;

    @Override
    public String toString() {
        return "Appointments{" +
                "id=" + id +
                ", userId=" + userId +
                ", doctorId=" + doctorId +
                ", departmentId=" + departmentId +
                ", appointmentTime=" + appointmentTime +
                ", reason='" + reason + '\'' +
                ", contactPhone='" + contactPhone + '\'' +
                ", appointmentStatus=" + appointmentStatus +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }
}